<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第二题</title>
</head>

<body>
    <script>
        let shu = prompt('请输入你的成绩')
        console.log(typeof shu);
        let num = Number(shu)
        console.log(typeof num)
        if (num >= 0 && num <= 100) {
            console.log('输入成绩格式正确')
            if (num < 60 && num >= 0) {
                alert('E')
            } else if (num >= 60 && num < 70) {
                alert('D')
            } else if (num >= 70 && num < 80) {
                alert('C')
            } else if (num >= 80 && num < 90) {
                alert('B')
            } else if (num >= 90 && num <= 100) {
                alert('A')
            }
        } else {
            alert('请输入正确的成绩')
        }
    </script>
</body>

</html>